package de.wbh.gwt.form.layouter.shared.event;

import com.allen_sauer.gwt.dnd.client.drop.CustomDropController;
import com.google.web.bindery.event.shared.Event;

public class DropControllerAddedEvent extends Event<DropControllerAddedEvent.Handler> {

	public static interface Handler {
		void onDropControllerAdded(DropControllerAddedEvent event);
	}

	private static final Type<Handler> TYPE = new Type<DropControllerAddedEvent.Handler>();

	public static Type<Handler> getType() {
		return TYPE;
	}

	private final CustomDropController dropController;

	public DropControllerAddedEvent(CustomDropController dropController) {
		this.dropController = dropController;
	}

	@Override
	protected void dispatch(Handler handler) {
		handler.onDropControllerAdded(this);
	}

	@Override
	public Event.Type<Handler> getAssociatedType() {
		return TYPE;
	}

	public CustomDropController getDropController() {
		return this.dropController;
	}

}
